# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Ross melin <rdmelin@gmail.com>

pkgname=perl-device-serialport
pkgver=1.04
pkgrel=17
pkgdesc="POSIX clone of Win32::SerialPort"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/Device-SerialPort"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/C/CO/COOK/Device-SerialPort-$pkgver.tar.gz)
sha256sums=('d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7')

build() {
  cd  "$srcdir"/Device-SerialPort-$pkgver
  eval `perl -V:archname`
  PERL_MM_USE_DEFAULT=1 /usr/bin/perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/Device-SerialPort-$pkgver
  make DESTDIR="$pkgdir" install
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
